﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr">

	<head>
	  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
	  <link rel="stylesheet" type="text/css" href="css.css" />
	  <title>Distributeur</title>
	</head>
	<body>
		<!-- commentaire html -->
		<h1>Mettre un logo a la con</h1>	
		<h2>Maquette distributeur H2</h2>
		<p></p>
		<div id="distributeurMain">
		<form method="post" action="distributeur.php">			
			<p>
				(numero d identification)Login : <input type="text" name="login" />
			</p>
			<p>
				mot de pass : <input type="text" name="mdp" />
			</p>
			<input type="reset" value="remettre à zéro"/>
			<input type="submit" value="OK"/>
		</form>
		</div>		
	</body>
</html>
<?php
require_once '../sources/dao/DaoClients.class.php';
//test ligne 32
//test ligne 33
if(isset($_REQUEST['login']) && isset($_REQUEST['mdp']))
{
	$login = $_REQUEST['login'];
	$mdp = $_REQUEST['mdp'];
	
	$client = new DaoClients();
	$isDedans = $client->isClient($login,$mdp);
	if($isDedans == 1)	{
		echo "vous etes client : ".$login." et ton pass est ".$mdp;
	}
	else{
		echo "<center><H1>IDENTIFICATION OU MOT DE PASSE NON VALIDE</H1></center>";
	}	
}

?>

